<template>
	<view class="container">
		
		<view class="panel_box">
			<view class="box_title">选择发货单</view>

			<view class="popup_list_item" v-for="(item,index) in formData.deliver" :key="index">
				
				<view style="overflow: hidden; width: 100%;">
					<view class="item_left_top">
						<view class="item_title">{{item.cCusName}}</view>
						<!--<view class="item_sub_title">{{salerInfo.tel}}</view>-->
						<!--<view class="item_type">{{item.user_code}}</view>-->
					</view>
				</view>
				
				<view style="overflow: hidden; width: 100%;">
					<view class="item_left">
						
						<view class="item_left_bottom">
				
							<view class="left_bottom_box">
								客户编码：{{item.cCusCode}}
							</view>
							
							<view class="left_bottom_box">
								发货单号：{{item.cCode}}
							</view>
							
							<view class="left_bottom_box">
								发货日期：{{item.dDate}}
							</view>
							
							<view class="left_bottom_box">
								总金额：{{item.iNatSum}}
							</view>
		
						</view>
					</view>
				</view>
			</view>
					
			
			<view class="panel_content">
				<view style="margin:auto;margin-top: 30rpx; margin-bottom: 20rpx; width: 300rpx;">
					<button type="default" class="button"  size="mini" style="width:100%;background-color: #910a15;color: #fff; font-size: 30rpx;" @click="selectDeliver()">选择发货单</button>				
				</view>
			</view>
		</view>
		
		<view class="panel_box" style="padding-bottom: 20rpx;" >
			<u-tabs :list="list1" @click="tabClick" lineColor="#910a15" lineWidth="60"></u-tabs>
		</view>
		<view class="panel_box" :style="{display: tabIndex==0?'block':'none'}" >
			<view class="panel_box_title">上传发票截图</view>
			<view class="panel_content">
				<app-upload :images.sync="formData.images"></app-upload>
			</view>
		</view>
		
		<view class="panel_box" :style="{display: tabIndex==1?'block':'none'}" >
			<view class="box_title">发票信息</view>
			
			<view class="panel_content">
				
				<view class="panel_form">

					<view class="form_item" v-for="(item,index) in invoiceField" :key="index" v-if="item.field_type=='text'" >
						<view class="form_item_name">{{item.title}}：</view>
						<view class="form_item_input">
							<input v-model="formData[item.name]"  type="text" class="uni-input"   placeholder-style="color:#a9a9a9" />
						</view>
					</view>
					
				</view>
				
				
			</view>

		</view>
	
		<view style="margin-top: 60rpx; margin-bottom: 100rpx;text-align: center;" >
			<button type="default" class="button" style="width: 80%; background-color: #910a15;color: #fff; font-size: 30rpx;" @click="submitForm()">提交开票</button>				
		</view>
		
		<deliverListPopup :show.sync="deliverShow" :dataInfo.sync="formData.deliver" ></deliverListPopup>
	</view>
</template>


<script>
	
	import deliverListPopup from '@/pages/invoice/components/deliver-list-popup/deliver-list-popup.vue'
	import  parentPage from '@/common/parent-page.js';
	import {index} from './index.js';
	export default {mixins: [parentPage,index],components: {'deliverListPopup': deliverListPopup}}
</script>



<style>
	@import './index.css';
</style>
